# 导包
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
# 打开浏览器
driver = webdriver.Chrome()
# 输入网址
driver.get('https://zhipin.com')
# 获取输入框
query = driver.find_element(By.NAME, 'query')
# 输入内容
query.send_keys('软件测试')
# 获取搜索按钮
search = driver.find_element(By.CLASS_NAME, 'btn-search')
# 单击搜索按钮
search.click()
# 打印网页标题
time.sleep(3)
print(driver.title)
# 关闭浏览器
time.sleep(3)
driver.quit()
